classDiagram
    class Creator {
        +factoryMethod(productType: str): Product
    }
    class Product {
        <<interface>>
        +operation(): str
    }
    class ConcreteProductA {
        +operation(): str
    }
    class ConcreteProductB {
        +operation(): str
    }

    Creator --> Product : Creates
    Product <|.. ConcreteProductA : Implements
    Product <|.. ConcreteProductB : Implements
